import javax.imageio.stream.FileImageInputStream;
import java.util.Arrays;

public class ArrayDemo04 {
    static String s;

    public static void main(String[] args) {
        // 二维数组
        /*
            [[0,0],[0,0],[0,0]]
            [[1,2],[3,4],[5,6]]
         */
        int[][] nums = new int[3][2];

        // 装数据
        nums[0][0] = 1;
        nums[0][1] = 2;
        nums[1][0] = 3;
        nums[1][1] = 4;
        nums[2][0] = 5;
        nums[2][1] = 6;
        // 取数据
        System.out.println(nums[0][0]);


        int[][] nums1 = new int[2][];
        System.out.println(nums1[0]);//null

        int[] nums2 = {1, 2};
        nums1[0] = nums2;
        System.out.println(nums1[0]);

        System.out.println(Arrays.toString(nums1[0]));//[1,2]


        System.out.println(nums.length);//2
        System.out.println(nums[0].length);//2
    }

}
